﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetTrademarkDlg.aspx.cs" Inherits="Trademark_GetTrademarkDlg" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../css/f_css.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    #gv th
    {
        border:none;
    }
    #gv td
    {
        border-top:none;
        border-left:none;
        border-right:none;
        border-bottom:solid 1px #EEEEEE;
    }
    </style>
    <script language="javascript" src="../js/common.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
    function closeDialog(key,value)
    {
        window.parent.document.onDialogCallBack(1, key, value);
    }

    function onOK() {
        if (getx("hfTrademarkID").value) {
            var data = {
                tmid: getx("hfTrademarkID").value,
                tmName: getx("lblTrademarkName").innerText
            }
            window.parent.document.onDialogCallBack(1, "succeed", data);
        }
    }
    function onCancel() {
        window.parent.document.onDialogCallBack(0, null, null);
    }
    function setValue(trademarkId, trademarkName) {
        getx("lblTrademarkName").innerText = trademarkName;
        getx("hfTrademarkID").value = trademarkId.toString();
    }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="height:30px; line-height:30px;">
    
    </div>
    <div style="padding:5px;">
    <asp:GridView ID="gv" runat="server" AutoGenerateColumns="False" CssClass="table2"
        DataKeyNames="AID" Width="99%">
        <RowStyle ForeColor="#000066" />
        <Columns>
            <asp:TemplateField>
                <ItemTemplate>
                    <a href="javascript:void(0);" onclick='javascript:setValue(<%# Eval("AID") %>, "<%# Eval("Name") %>"); return false;' >选择</a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Name" HeaderText="商标名" />
            <asp:TemplateField HeaderText="开始日期">
                <ItemTemplate><%# FormatDateTime(Eval("RegisterDate"))%></ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="RegisterNumber" HeaderText="注册号" />
            <asp:BoundField DataField="RegisterUser" HeaderText="注册用户" />
            <asp:BoundField DataField="RegisterAddress" HeaderText="注册地址" />
            <asp:BoundField DataField="RegisterZipcode" HeaderText="注册邮编" />
            <asp:TemplateField HeaderText="申请日期">
                <ItemTemplate><%# FormatDateTime(Eval("ApplyDate"))%></ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="ApplyNumber" HeaderText="申请号" />
            <asp:BoundField DataField="CreateDateTime" DataFormatString="{0:yyyy-M-d}" HeaderText="创建日期" />
        </Columns>
        <HeaderStyle CssClass="listhead" />
        <AlternatingRowStyle CssClass="alt" />
    </asp:GridView>
    </div>
    <br />
    已选择: <span id="lblTrademarkName" style="color:Red">无</span>
        <input type="hidden" id="hfTrademarkID" />
    <br />
    <div style="text-align:center; height:40px; line-height:40px;">
        <input type="button" class="input00" value="确定" onclick="javascript:onOK();" />
        <input type="button" class="input00" value="取消" onclick="javascript:onCancel();" />
    </div>
    </form>
</body>
</html>
